//封装所有与权限相关的接口
import request from '@/utils/request'

//根据Id获取权限详情  查
export function getSysPermissionApi(id) {
  return request({
    url: `/sys/permission/${id}`
  })
}

//根据ID更新权限点详情  改
export function setSysPermissionApi(data) {
  return request({
    url: `/sys/permission/${data.id}`,
    method: 'put',
    data
  })
}

//根据id删除权限点 删
export function delSysPermissionApi(id) {
  return request({
    url: `/sys/permission/${id}`,
    method: 'delete',
  })
}

//添加权限点  增
export function addSysPermissionApi(data) {
  return request({
    url: '/sys/permission',
    method: 'post',
    data
  })
}

// 获取所有权限点
export function getAllPermissionApi() {
  return request({
    url: '/sys/permission',
    method: 'get',
  })
}


